package xgame.login;

import java.util.HashMap;
import java.util.Map;

import xgame.IXglobalHandler;
import xgame.IXmoduleT;
import xgame.XcommandXhandlerPair;
import xgame.login.cmd.CmdIdConsts;
import xgame.login.cmd.LoginCmd;
import xgame.login.handler.LoginHandler;

/**
 * 登录模块模板
 * 
 * @author AfritXia 
 * @version $Rev: 0 $
 *
 */
public class LoginModuleT implements IXmoduleT {
	@Override
	public Map<Integer, XcommandXhandlerPair> getCommandHandlerMap() {
		// 命令处理器字典
		Map<Integer, XcommandXhandlerPair> map = new HashMap<Integer, XcommandXhandlerPair>();

		// 添加登录命令
		map.put(CmdIdConsts.LOGIN_CMD, 
			XcommandXhandlerPair.newInstance(new LoginCmd(), new LoginHandler()));
		
		return map;
	}

	@Override
	public IXglobalHandler getGlobalHandler() {
		return null;
	}
}
